import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 徐海涛
 * Date: 2021-11-16
 * Time: 12:39
 */
public class clas
    public static void main19(String[] args) {
        int i,j;
        for (i = 2; i <= 100 ; i++) {
            for (j = 2; j < i ; j++) {
                if (i % j == 0){
                    break;
                }
            }
        }
        if (i == j) {
            System.out.println(i);
        }
    }
    public static void main18(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 2;
        for (; i < 100 ; i++) {
            if (n % i == 0) {
                break;
            }
        }
        if (n == i) {
            System.out.print(n + "是素数");
        }
        System.out.println(n);
    }


    public static void main17(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 2;
        for (; i < n ; i++) {
            if (n % i == 0) {
                System.out.println(n + "不是素数");
                break;
            }
            }
        if (n == i) {
            System.out.println(n + "是素数");
        }


    }
    public static void main16(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 2; i < n ; i++) {
            if (i % n == 0 ) {
                System.out.println(n + "不是素数");
                break;
            } else {
                if (n == i ) {
                    System.out.println(n + "是素数");
                }
            }

        }
    }

    public static void main15(String[] args) {
        for (int i = 2; i <= 100 ; i++) {
            for (int j = 2; j <=i ; j++) {
                if (i % j == 0) {
                    System.out.println("不是素数");
                    break;
                } else {
                    if (i == j ) {
                        System.out.println("是素数");
                    }
                }

            }

        }
    }

    public static void main14(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        for (int j = 2; j <= i ; j++) {
            if (i % j == 0) {
                break;
            } else {
                if (i == j) {
                    System.out.println(i + "是素数");
                } else
                    if (i != j) {
                        System.out.println(i + "不是素数");
                    }
            }

        }
    }
    public static void main13(String[] args) {
        for (int i = 2; i <= 100 ; i++) {
            for (int j = 0; j <= i ; j++) {
                if (i % j == 0) {
                    break;

                } else {
                    if (i == j) {
                        System.out.println(i);
                    }
                }
            }

        }
    }
    public static void main12(String[] args) {
        for (int year = 1000; year <= 2000 ; year++) {
            if (year % 4 == 0 && year % 100 == 0) {
                System.out.println(year + "是普通闰年");
            } else {
                if (year % 100 == 0 && year % 400 == 0) {
                    System.out.println(year + "是世纪闰年");
                }
            }

        }
    }

    public static void main11(String[] args) {
        int count = 0;
        for (int i = 0; i <= 100 ; i++) {
            if (i % 10 == 9) {
                System.out.println();
                count++;
            } else {
                if (i / 10 == 9) {
                    System.out.println();
                    count++;
                }
            }
        }
        System.out.println(count);
    }
    public static void main10(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100 ; i++) {
            if (i % 9 == 9) {
                count++;
            } else {
                if (i / 9 == 9) {
                    count++;
                }
            }

        }
        System.out.println(count);
    }
    public static void main8(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        for (int i = 1; i <= 100 ; i++) {
            if (i % 10 == 9) {
                count++;
            } else {
                if (i / 10 == 9) {
                    count++;
                }
            }
        }
        System.out.println(count);
    }

    public static void main9(String[] args) { //1-100所有整数中出现9的数
        int count = 0;
        for (int i = 1; i <= 100 ; i++) {
            if (i % 10 == 9) {
                count++;
            }
            if (i / 10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }

    public static void main7(String[] args) { //计算一份之一－二分之一加三分之一到一百分之一
        double sum = 0.0;
        int flg = 1;
        for (int i = 1; i <= 100 ; i++) {
            sum = sum + 1.0/i*flg;
            flg = -flg;
        }
        System.out.println(sum);
    }
    public static void main6(String[] args) {  //求最大公约数！
        int a = 24;
        int b = 18;
        int c = a%b;
        if (c != 0 ) {
            a = b;
            b = c;
            c = a%b;
        }
        System.out.println("最大公约数是" + b);

    }
    public static void main5(String[] args) { //打印99乘法表
        for (int i = 1; i <= 9 ; i++) {
            for (int j = 1; j <= i ; j++) {
                System.out.println(i + "*" + j + "=" + i*j + "");
            }
            System.out.println();

        }
    }
    public static void main4(String[] args) { //1000到2000年间的闰年
        for (int year = 1000; year <= 2000 ; year++) {
            if (year % 4 == 0 && year % 100 != 0) {
                System.out.println(year + "是闰年");
            }
            else {
                if (year % 400 == 0 && year % 100 == 0) {
                    System.out.println(year + "是闰年");
                }
            }
        }

    }
    public static void main3(String[] args) {
        int count = 0;
        for (int i = 2; i <= 100 ; i++) {
            for (int j = 2; j <= i; j++) {
                while (i % j == 0) {
                    break;
                }
                if (i == j) {
                    System.out.println(i);
                }
            }

        }
    }
    public static void main2(String[] args) {  //判断是不是素数
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 2; i <= n; i++) {
            if (n % i == 0) {
                System.out.println(n + "不是素数");
                break;
            }
            if (i == n) {
                System.out.println(n + "是素数");

            }
        }
    }
    public static void main1(String[] args) {
       for1:for (int i = 2; i <= 100 ; i++) {
            System.out.println(i);
            for (int j = 2; j <= i; j++) {
                if (i % j == 0) {
                    continue for1;
                }
            }
           System.out.println(i);
            
        }
    }
}
